import axios from '@/request.js'


export function getstore(page){
    
    return axios.get(`/store?page=${page}`);
  } 

export function create(data) {
    return axios.post("/store/create", data);
  }

export function update(id,data) {
  return axios.post(`/store/update?id=${id}`, data);
}

export function del(id){
  return axios.post(`/store/delete/id/${id}`);
}

//banner
export function getbanner(page){
    
  return axios.get(`/banner?page=${page}`);
} 

export function createbanner(data) {
  return axios.post("/banner/create", data);
}

export function updatebanner(id,data) {
return axios.post(`/banner/update?id=${id}`, data);
}

export function delbanner(id){
return axios.post(`/banner/delete/id/${id}`);
}

//客服
export function getservice(page){
    
  return axios.get(`/service?page=${page}`);
} 

export function createservice(data) {
  return axios.post("/service/create", data);
}

export function updateservice(id,data) {
return axios.post(`/service/update?id=${id}`, data);
}

export function delservice(id){
return axios.post(`/service/delete/id/${id}`);
}
//about
export function getabout(page){
    
  return axios.get(`/about?page=${page}`);
} 

export function createabout(data) {
  return axios.post("/about/create", data);
}

export function updateabout(id,data) {
return axios.post(`/about/update?id=${id}`, data);
}

export function delabout(id){
return axios.post(`/about/delete/id/${id}`);
}

//paypal
export function getpaypal(page){
    
  return axios.get(`/paypal`);
} 

export function updatepaypal(data) {
  return axios.post(`/paypal/update`, data);
  }